﻿#include "IPSetDialog.h"
#include "ui_IPSetDialog.h"

IPSetDialog::IPSetDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::IPSetDialog)
{
    ui->setupUi(this);
    this->setWindowTitle("设置IP和端口");
}

void IPSetDialog::setDefaultIpPort(QString Ip, quint16 Port)
{
    ui->lineEdit_IP->setText(Ip);
    ui->spinBox_Port->setValue(Port);
}

IPSetDialog::~IPSetDialog()
{
    delete ui;
}

void IPSetDialog::on_btn_IPSet_clicked()
{
    emit sendIpAndPort(ui->lineEdit_IP->text(),ui->spinBox_Port->value());
    close();
}
